package com.example.websocket.pattern.creational.factory.abstractFactoryPattern;

import com.example.websocket.pattern.creational.factory.abstractFactoryPattern.line.color.Color;
import com.example.websocket.pattern.creational.factory.abstractFactoryPattern.line.shape.Shape;

public class AbstractFactoryDEMO {

    public static void main(String[] args) {
        AbstractFactory factory = new ShapeFactory();

        Shape shape1 = factory.getShape("CIRCLE");
        shape1.draw();

        Shape shape2 = factory.getShape("SQUARE");
        shape2.draw();

        Shape shape3 = factory.getShape("RECTANGLE");
        shape3.draw();

        AbstractFactory factory1 = new ColorFactory();

        Color color1 = factory1.getColor("RED");
        color1.painting();

        Color color2 = factory1.getColor("GREEN");
        color2.painting();

        Color color3 = factory1.getColor("YELLOW");
        color3.painting();

    }
}
